<?php
 /**
 * 增加自定义编辑器类
 *
 * LICENSE: 
 * @author $Id: FormEditor.php 31 2011-11-22 06:22:25Z kylingood $
 * @since      Release 1.0.0
 * @copyright  Copyright (c) 2010-2011 Mumayi.com Inc. (http://www.mumayi.com)
*/
require_once 'Zend/View/Helper/Abstract.php';


class Custom_View_Helper_FormEditor extends Zend_View_Helper_FormElement
{
   
    public function formEditor($name, $value = null, $attribs = null)
    {
    	
		$ckeditor = new Custom_Controller_Plugin_Editor();
		$ckeditor->basePath = '/public/js/ckeditor/';
		
		$ckeditor->config['filebrowserBrowseUrl'] = '/public/js/ckfinder/ckfinder.html';
		$ckeditor->config['filebrowserImageBrowseUrl'] = '/public/js/ckfinder/ckfinder.html?type=Images';
		$ckeditor->config['filebrowserFlashBrowseUrl'] = '/public/js/ckfinder/ckfinder.html?type=Flash';
		$ckeditor->config['filebrowserFilesBrowseUrl'] = '/public/js/ckfinder/ckfinder.html?type=Files';
		$ckeditor->config['filebrowserUploadUrl'] = '/public/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
		$ckeditor->config['filebrowserImageUploadUrl'] = '/public/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
		$ckeditor->config['filebrowserFlashUploadUrl'] = '/public/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';

		return $ckeditor->editor($name,$value,$attribs);
    	
    }
}
